﻿// Copyright (c) JosephZheng. All rights reserved. See License.txt in the project root for license

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Linq;
using System.ServiceModel;
using System.ServiceProcess;
using System.Text;

namespace Lyra.Cache.Server.WindowsServiceHost
{
    public partial class LyraCacheService : ServiceBase
    {
        ServiceHost _cacheHost = null;
        public LyraCacheService()
        {
            InitializeComponent();
        }

        protected override void OnStart(string[] args)
        {
            _cacheHost = new ServiceHost(typeof(CacheServer));
            _cacheHost.Open();
        }

        protected override void OnStop()
        {
            _cacheHost.Close();
        }
    }
}
